import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/emp',  //地址hash
    name: 'emp',
    component: () => import('../views/tilas/EmpView.vue')  //对应的vue组件
  },
  {
    path: '/dept',
    name: 'dept',
    component: () => import('../views/tilas/DeptView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/tilas/LoginPage.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/tilas/HomePage.vue')
  },
  {
    path: '/first',
    name: 'first',
    component: () => import('../views/tilas/HomeView.vue')
  },
  {
    path: '/find',
    name: 'find',
    component: () => import('../views/tilas/ViewFind.vue')
  },
  {
    path: '/test',
    name: 'test',
    component: () => import('../views/tilas/TestView.vue')
  }, {
    path: '/',
    redirect: '/login' //表示重定向到/emp即可
  },
]

const router = new VueRouter({
  routes
})

export default router